home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-26 | 3.4 KB | 92 lines | [TEXT/GEOL] |
- Item 4901396 9-June-89 11:24
-
- From: CDA0400 DEV Isolation Systems
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: MacApp Document Q's?
-
- To: Macintosh Developers technical Support
- AppleLink: MACDTS
-
- From: David Fleming
- Isolation Systems Ltd.
- AppleLink address: CDA0400
-
- Re: MacApp Document Questions.
-
- I just know that you are expecting some arcane security-related question, but I
- decided to change topics for this memo.
-
- For our security project we are going to be creating one medium-sized
- application and two additional mini-applications. As I have long been a
- promoter of object-oriented programming (even before it was trendy to do so), I
- chose MacApp as a starting point. Here are my questions...
-
- Question #1:
- In this particular situation I want to use a disk-based document that will
- contain the parameters for the application, similar to globals. There are few
- enough of them that I can hold them all in memory at one time. I would like
- this information to be loaded from disk into memory upon startup from the
- finder, BUT, I do not want it displayed in views until the user chooses the
- corresponding menu item. Different subsets of information from this document
- will be displayed in each of 4 windows with their corresponding subviews (from
- resource 'view' templates). These windows can be opened at any time by the
- user, and any or all of them can be open at once. They represent different
- areas of configuration for our hardware product.
- I am uncertain as to the best way to implement this structure in MacApp. I am
- not sure to what lengths MacApp goes on startup based on the objects and
- methods created.
-
- If I supply a TMyApplication.DoMakeDocument does MacApp want to display this
- document or just create it?
-
- Should I Override TMyDocument.DoMakeViews to do nothing and leave this until
- later by menu command?
-
- Also, because I want MacApp to open an existing file (not a NEW document), how
- do I get it to do this?
-
- Should I be overriding TMyApplication.HandleFinderRequest to not open the
- document upon startup, but handle it another way?
-
- Question #2:
- Each of the configuration windows has its own menu in addition to the standard
- Apple,File,Edit and my 'Window' and 'Help' menus. The menubar must be toggled
- each time a new window is opened or when the user brings one of the other
- windows to the front. I have added other cmnu and mbar resources as outlined
- below:
-
- /* Menu def'n for the System Setup menu*/
- resource 'cmnu' (6) {
- 6,
- textMenuProc,
- allEnabled,
- enabled,
- "System Setup",
- { /* array: 2 elements */
- /* [1] */
- "Set ISAC Time", noIcon, "Z", noMark, plain, cSystemTime;
- /* [2] */
- "View Setup", noIcon, noKey, noMark, plain, cSystemView
- }
- };
-
- /* Menu bar wanted when System Setup Window Active */
- resource 'MBAR' (130) {
- {1; 2; 3; 4; 6; 5}
- };
-
- Is this the correct way in MacApp?
- And if so, how do I install these menus, and in what methods?
- (my guess is to have them in the TTheParticularWindow.DoSetupMenus to
- initialize them the first time, but I don't know where to put them when
- toggling from window to window.)
-
- A small section of sample code would be an immense help.
-
- Thank you for any help that you can shed on these issues. While I understand
- the methodology behind MacApp, I do not know what it expects and how it will
- react to non-standard situations.
-
-